<template>
	<view class="myMember">
		<view class="header">
			<view class="search_box">
				<input type="text" v-model="searchContent" @input="search" placeholder="搜索"> 
				<image src="../../../static/img/member/search.png"></image>
				<text @click="titleContent == '取消' ? cancel() : attentionMy()"  class="cancel">{{titleContent}}</text>
			</view>
			<view class="navigation">
				<view class="combo" :class="{'on' : 1 == current}" @click="clickTab(1)">我的会员</view>
				<view class="attention" :class="{'on' : 0 == current}" @click="clickTab(0)">关注我的</view>				
			</view>
		</view>
		<!-- 付费会员 -->
		<view class="comboBox" v-if="current == 1">
			<view class="memberContent" v-for="(item,index) in list" :key="index">
				<view class="CustomerId">
					<view class="name" @click="jump(item)" ><view>{{item.realName ? item.realName : item.userName}}</view><text>{{item.sex == 1?'男': item.sex == 2 ? '女' : '性别不详'}}&emsp;{{item.age ? item.age+'岁': '年龄未知'}}</text></view>
					<image src="../../../static/img/member/chat.png"  @click="toImchat(item)" ></image>
					<image src="../../../static/img/phone.png" class="phone" @click="toTell(item)"></image>
				</view>
				<view class="unit_box">
					<view class="information">
						<view  @click="jump(item)">单&emsp;&emsp;位：{{item.employer || '未填写单位'}} </view>
						<view  @click="jump(item)">手&ensp;机&ensp;号：{{item.phone}}</view>
						<view class="healthExpert" v-if="healthRank != 2"><em>健康专家：</em>
							<p class="expertsName"><span v-for="(a,ai) in item.expertList" :key="ai">{{a.expertName}}</span> 
							<text  @click="addExperts(item)"><image src="../../../static/img/member/attention.png"></image>添加</text></p>
						</view>
						<!-- <view class="healthExpert" v-if="healthRank == 2">健康管理师：<span>{{item.healthManagerName}}</span></view> -->
					</view>
				</view>
			</view>
		</view>
		<!-- 关注会员 -->
		<view class="attentionMy" v-if="current == 0">
			<view class="memberContent" v-for="(item,index) in list" :key="index">
				<view class="CustomerId" >
					<view class="name"  @click="AttentionMyjump(item)"><view>{{item.realName ? item.realName : item.userName}}</view><text>{{item.sex == 1?'男': item.sex == 2 ? '女' : '性别不详'}}&emsp;{{item.age ? item.age+'岁': '年龄未知'}}</text></view>
					<image src="../../../static/img/member/chat.png"  @click="toImchat(item)" ></image>
					<image src="../../../static/img/phone.png" class="phone" @click="toTell(item)"></image>
				</view>
				<view class="unit_box">
					<view class="information"  @click="AttentionMyjump(item)">
						<view>会员编号：{{item.userNumber}}</view>
						<view>单 位： {{item.employer || '未填写单位'}}</view>
						<view>手机号：{{item.phone || '未填写手机号'}}</view>
					</view>
					<view class="otherAttention attentionA" v-if="item.status == 1" @click="follow(item)"><image src="../../../static/img/member/attentionA.png"></image>关注</view>		
					<view class="otherAttention" v-if="item.status == 3" @click="unfollow(item)">互相关注</view>					
				</view>
			</view>
		</view>
	</view>
</template>

<script src="@/static/js/headFeatures/member/myMember.js"></script>

<style lang="scss" scoped>
	@import '@/static/css/headFeatures/member/myMember.scss';
</style>
